<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
        .div1 {
            position: relative;
            width: 100px;
            height: 100px;
            background: #dbf0e9;
        }

        .div1:before,
        .div1:after {
            content: "";
            display: block;
            width: 0;
            height: 0;
            border: 2px solid transparent;
            box-sizing: border-box;
            position: absolute;
        }

        .div1:before {
            top: 0;
            left: 0;
            transition: border-color 0s ease-in 0.8s, width 0.2s ease-in 0.6s, height 0.2s ease-in 0.4s;
        }

        .div1:after {
            right: 0;
            bottom: 0;
            transition: border-color 0s ease-in 0.4s, width 0.2s ease-in 0.2s, height 0.2s ease-in;
        }

        .div1:hover:before {
            width: 100%;
            height: 100%;
            transition: width 0.2s ease-in, height 0.2s ease-in 0.2s;
            border-top-color: #ff5b00;
            border-right-color: #ff5b00;
            border-left-color: #ff5b00;
           
   
          
            
        }

        .div1:hover:after {
            width: 100%;
            height: 100%;
            transition: border-color 0s ease-in 0.4s, width 0.2s ease-in 0.4s, height 0.3s
        }
    </style>
</head>

<body>
    <div class="div1"></div>
</body>

</html>